The Printing Alert ('plrt') Resource
You need to include a printing alert resource to define the messages that require user attention during the printing process. Figure 6-3 shows the structure of the printing alert resource.Figure 6-3 The printing alert resource
The printing alert resource contains a number of fields that you can use to define alert messages for display to the user in printing alert boxes.
Table 6-4 shows the constants that you can use to specify which kind of printing alert you are defining.
- Alert version. The type of printing alert that this resource represents. There are currently 2 versions, as shown in Table 6-4.
- Icon ID. The type of icon to display in the upper-left corner of the alert. The icon types are shown in Table 6-5.
- Text size. The size of the text to display in the alert. You can use the value
defaultSystemSize
to indicate that the default text size for the system is to be used.- Default button. The string to display on the default button. You use one of the values shown in Table 6-7.
- Cancel button. The string to display on the cancel button. You use one of the values shown in Table 6-7.
- Text string. The string to display in the alert window.
- Action button label. The string that is displayed on the action button. This is a required value.
- Button label 2. The string that is displayed on button 2. This is an optional value.
- Button label 3. The string that is displayed on button 3. This is an optional value.
- Font name. The name of the font used to display the text in this alert.
- Alert title. The title displayed for this alert.
Table 6-5 shows the constants that you can use to specify the icon ID for a printing
alert resource.Table 6-7 shows the constants that you can use to specify the default button strings in a printing alert resource.
Table 6-7 shows the constants that you can use to specify the cancel button strings in a printing alert resource.
Listing 6-4 shows an example of a printing alert resource.
Listing 6-4 An example of a printing alert resource
resource 'plrt' (kDriverStatus, sysHeap, purgeable) { printingStatus, cautionIcon, defaultSystemSize, defaultAction, noCancelTitle, "The document "!1" cannot be printed, because the printer " ""!0" is offline. To continue printing, please make " "sure the printer is " "properly connected and turned on. If you wish " "to cancel printing, please click Cancel Printing.", "Cancel Printing", "", "", " ", "Printer offline"};This resource defines the contents of the printing alert box that corresponds to the second entry in the status resource that is shown in Listing 6-3 on page 6-21. The printing alert box contains a caution icon and a Cancel button. The text is displayed using the default system font and text size.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help